import VueRouter from 'vue-router'
import homeContainer from '@/components/tabbar/homeContainer.vue'
import memberContainer from '@/components/tabbar/memberContainer.vue'
import shopcarContainer from '@/components/tabbar/shopcarContainer.vue'
import setupContainer from '@/components/tabbar/setupContainer.vue'

import newsList from '@/components/news/newslist.vue'
import newsDetail from '@/components/news/detail.vue'


import photoList from '@/components/photos/photoList.vue'
import goodsList from '@/components/goods/goodsList.vue'
import goodsInfo from '@/components/goods/goodsInfo.vue'



// test 测试版
import Lazyload from '@/components/test/Lazyload.vue'

import login from '../components/subcom/login.vue'
import register from '../components/subcom/register.vue'



var router = new VueRouter({
  routes: [
    {
      path: '/',
      name: '首页',
      component: homeContainer,
    },
    {
      path: '/home',
      name: '首页',
      component: homeContainer,
      children: [
        {
          path: '/login',
          component: login,
        }, {
          path: '/register',
          component: register,
        }
      ]
    }, {
      path: '/member',
      name: '会员',
      component: memberContainer
    }, {
        path: '/shopcar',
        name: '购物车',
        component: shopcarContainer
    }, {
        path: '/setup',
        name: '设置',
        component: setupContainer
    },{
      path: '/home/newsList',
      component: newsList
    },{
      path: '/home/newsDetail/:id',
      component: newsDetail,
    },{
      path: '/home/photoList',
      component: photoList
    },{
      path: '/Lazyload',
      component: Lazyload,
    },{
      path: '/home/goodsList',
      component: goodsList,
    },{
      path: '/home/goodsInfo/:id',
      component: goodsInfo,
      name: 'goodsinfo'
    },
  ],
  linkActiveClass: 'mui-active' //覆盖默认的路由高亮类 router-link-active
})


export default router